/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test.controllers;

import java.util.Map;
import javax.validation.Valid;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import test.model.ShortPath;

/**
 *
 * @author hjhi
 */
@Controller
@RequestMapping("shortestpath.htm")
public class ShortesPathController {
    
    @RequestMapping(method = RequestMethod.GET)
    public String showMap(Map model) {
        ShortPath shortPath = new ShortPath();
        model.put("shortPath", shortPath);
        return "shortPath";
    }

    @RequestMapping(method = RequestMethod.POST)
    public void processPath(@Valid ShortPath shortPath, BindingResult result,
            Map model) {
        
        
        System.out.println("nitesh");
    }
}
